﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

public class SessionPage : System.Web.UI.Page
{
	protected string CurrentUserName = string.Empty;

	protected override void OnPreInit(EventArgs e)
	{
		//clear cache
		Response.Expires = 0;
		Response.Cache.SetNoStore();
		Response.Cache.SetCacheability(HttpCacheability.NoCache);

		//current user
		if (Session["CurrentUserName"] != null)
			CurrentUserName = (string)Session["CurrentUserName"];
		else
			Response.Redirect("/admin", true);

		base.OnPreInit(e);
	}
}
